home *** CD-ROM | disk | FTP | other *** search
- unit PrjToWeb;
-
- interface
-
- uses
- ExptIntf, Windows;
-
- type
- TPrjToWebWizard = class (TIExpert)
- public
- function GetStyle: TExpertStyle; override;
- function GetName: string; override;
- function GetAuthor: string; override;
- function GetComment: string; override;
- function GetPage: string; override;
- function GetGlyph: HICON; override;
- function GetState: TExpertState; override;
- function GetIDString: string; override;
- function GetMenuText: string; override;
- procedure Execute; override;
- end;
-
- procedure Register;
-
- implementation
-
- uses
- Dialogs, ToolIntf, SysUtils, Convert, ShellApi;
-
- function TPrjToWebWizard.GetStyle: TExpertStyle;
- begin
- // show up in the Help menu
- Result := esStandard;
- end;
-
- function TPrjToWebWizard.GetName: String;
- begin
- // official name
- Result := 'PrjToWeb Wizard'
- end;
-
- function TPrjToWebWizard.GetAuthor: string;
- begin
- Result := 'Marco Cant∙';
- end;
-
- function TPrjToWebWizard.GetComment: String;
- begin
- Result := 'PrjToWeb Wizard';
- end;
-
- function TPrjToWebWizard.GetPage: string;
- begin
- Result := '';
- end;
-
- function TPrjToWebWizard.GetGlyph: HICON;
- begin
- Result := 0;
- end;
-
- function TPrjToWebWizard.GetState: TExpertState;
- begin
- if ToolServices.GetProjectName <> '' then
- Result := [esEnabled]
- else
- Result := [];
- end;
-
- function TPrjToWebWizard.GetIDString: String;
- begin
- // must be unique
- Result := 'MarcoCantu.PrjToWebWizard'
- end;
-
- function TPrjToWebWizard.GetMenuText: String;
- begin
- // the text of the menu item
- Result := '&PrjToWeb Wizard...'
- end;
-
- procedure TPrjToWebWizard.Execute;
- var
- Copyr, ResFile: string;
- begin
- Copyr := 'Source code copyright ...';
- if InputQuery ('PrjToWeb Wizard',
- 'Enter Copyright notice:', Copyr) then
- begin
- ResFile := CurrProjectToHTML (Copyr);
- if MessageDlg ('HTML file generated.'#13 +
- 'Do you want to open it in your browser?',
- mtConfirmation, [mbYes, mbNo], 0) = idYes then
- ShellExecute (ToolServices.GetParentHandle,
- 'open', PChar (ResFile), '', '', sw_ShowNormal);
- end;
- end;
-
- procedure Register;
- begin
- RegisterLibraryExpert(TPrjToWebWizard.Create);
- end;
-
- end.
-